package models;

import java.io.*;
import java.net.Socket;

public class ClientWorker extends Thread {
    private Game game;
    BufferedReader in = null;
	PrintWriter out = null;
	int playerId;

    ClientWorker(Game game, int playerId) {
		this.game = game;
		this.playerId = playerId;
		
		
		
		/*try {
	    	in = new BufferedReader(new InputStreamReader(client.getInputStream()));
	    	out = new PrintWriter(client.getOutputStream(), true);
	    	out.println("PID " + Integer.toString(playerId));
		} catch (IOException e) {
	    	System.out.println("in or out failed");
	    	System.exit(-1);
		}*/

    }
    
    public void run() {
		/*while(!this.isInterrupted()) {
			try {
				game.handleAction(in.readLine());				
			} catch (IOException e) {
				game.players.get(playerId).disconnected = true;
		    	System.out.println("Player " + playerId + " disconnected.");
		    	if (game.checkEndOfGame()) {
		    		game.setAllNotPlayed();
					game.setAllNotExchanged();
		    		game.endOfGame();
		    	}
		    	game.broadcastMessage("DSC " + playerId);
		    	if (playerId == game.activePlayerID) {
		    		game.afterMove();
		    	}

		    	this.interrupt();
			}
		}*/
    }
}
